/*
 * ftp_functions.h
 *
 *  Created on: Mar 26, 2013
 *      Author: root
 */

#ifndef FTP_FUNCTIONS_H_
#define FTP_FUNCTIONS_H_

#include <stdio.h>
#include <dirent.h>
#include "globals.h"
#include <unistd.h>
#include <string.h>
#include <stdlib.h>

int parse_command(char *data, int nbytes, int *sendNbytes, char **returnData, connectionInfo conn);
char *build_absolute_path(connectionInfo conn, char *dir);
int ftp_cd(char *data, int nbytes, int *sendNbytes, char **returnData, connectionInfo conn);
int ftp_lcd(char *data, int nbytes, int *sendNbytes, char **returnData, connectionInfo conn);
int ftp_put(char *data, int nbytes, int *sendNbytes, char **returnData, connectionInfo conn);
int ftp_get(char *data, int nbytes, int *sendNbytes, char **returnData, connectionInfo conn);
int ftp_ls(char *data, int nbytes, int *sendNbytes, char **returnData, connectionInfo conn);


extern char* chroot_dir;

#endif /* FTP_FUNCTIONS_H_ */
